<template>
	<view class="">
		<!-- {{user}}55 -->
		<view class="card" v-if="data.ParkFee">
			<view class="itemtitle">
				{{$z.$t("停车场信息")}}
			</view>

			<view class="ParkFee">
				{{ data.ParkFee }}
			</view>
		</view>
		<view class="card">
			<view class="itemtitle u-flex">
				<!-- <view class="iconfont">车</view> -->
				<view class="">
					{{$z.$t("充电车辆")}}
					<!-- <text class="vin">
						{{$z.$t("VIN码启动")}}
					</text> -->
				</view>

			</view>
			<view class="ParkFee u-flex u-flex-between" style="height: auto;padding-right: 20rpx;">
				<view v-if="user.ccp" style="flex: 1;">
					<view class="u-flex" style="height: 50rpx;color: #060606;"> {{$z.$t("车牌号")}}</view>
					<view class="u-flex" style="height: 50rpx;color: #136de7;border-bottom: 1px solid #f3f3f3;">
						{{ user.ccp||$z.$t("未添加") }}
					</view>
				</view>
				<view v-else class="u-flex" style="height: 50rpx;">
					{{ user.ccp||$z.$t("未添加") }}
				</view>
				<u-tag :text="tagName" plain shape="circle" @click="userccpfn"></u-tag>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			data: {
				type: Object,
				default: () => {},
			},
			user: {
				type: Object,
				default: () => {},
			},
			gtel: {
				type: String,
				default: () => {},
			}
		},
		computed: {
			// user() {
			// 	return this.$store.state.user.USearch;
			// },
			tagName() {
				return this.user.ccp ? this.$z.$t(" 编辑车辆") : this.$z.$t("添加车辆")
			}
		},

		mounted() {
			console.log('user11123', this.gtel)
		},
		methods: {
			async userccpfn() {
				uni.navigateTo({
					url: `/pages/userccp/userccp?gtel=${this.gtel}&type=1`
				})
				// if (!this.user.ccp) {
				// 	uni.navigateTo({
				// 		url: "/pages/userccp/add/add"
				// 	})
				// } else {
				// 	let CarmanageinfoSearch = await this.$z.request("/CarmanageinfoSearch", {
				// 		caruser: this.user.uUser,
				// 		carnum: this.user.ccp
				// 	})
				// 	if (CarmanageinfoSearch.length == 1) {
				// 		uni.navigateTo({
				// 			url: `/pages/userccp/add/add?id=${CarmanageinfoSearch[0].id}`
				// 		})
				// 	} else {
				// 		uni.$u.toast("请重新添加车牌此车牌已失效")
				// 		uni.navigateTo({
				// 			url: "/pages/userccp/add/add"
				// 		})
				// 	}
				// 	// console.log(CarmanageinfoSearch);
				// }
			}
		}
	}
</script>


<style lang="scss" scoped>
	.card {
		background: #fff;
		margin: 30rpx;
		background: #fff;
		border-radius: 20rpx;
		padding: 26rpx 0;
		line-height: 1;

		.dfjebox {
			padding-top: 20rpx;
			font-size: 24rpx;
			padding-left: 56rpx;
			// height: 30rpx;
			color: $uni-text-color-grey;

			.xq {
				color: $uni-color-primary;
			}
		}

		.ParkFee {
			// padding: 20rpx 0;
			padding-left: 30rpx;
			padding-top: 10rpx;
			font-size: 28rpx;
			display: flex;
			align-items: center;
			line-height: 36rpx;
			color: $uni-text-color-grey;


		}

		.itemtitle {
			font-size: 34rpx;
			font-weight: bold;
			height: 54rpx;
			padding-left: 30rpx;
			display: flex;
			align-items: center;

			// height: 72rpx;
			.vin {
				font-size: 24rpx;
				font-weight: normal;
				padding-left: 26rpx;
				color: #0069ee;
			}

			.iconfont {
				font-size: 26rpx;
				border-radius: 8rpx;
				color: #14bbb4;
				width: 36rpx;
				height: 36rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				background-color: #e2eeea;
				margin-right: 20rpx;
			}
		}

		.tds {
			padding-top: 32rpx;

			.item {
				width: 0;
				flex: 1;
				display: flex;
				justify-content: center;
				align-items: flex-start;

				.zhi {
					width: 48rpx;
					height: 48rpx;
					font-size: 32rpx;
					color: #fff;
					background: linear-gradient(#447ae2, #bec4ee);
					border-radius: 8rpx;
					display: flex;
					justify-content: center;
					align-items: center;
				}

				.jiao {
					background: linear-gradient(#6cca8d, #bcedd6);
				}

				.text {
					padding-left: 12rpx;

					.text1 {
						height: 48rpx;
						display: flex;
						align-items: center;
						font-size: 32rpx;
						color: $uni-text-color-grey;
						font-weight: bold;

						.zhixian {
							color: #4078e2;
						}

						.jiaoxian {
							color: #5eb867;
						}
					}

					.text2 {
						line-height: 40rpx;
						font-size: 24rpx;
						color: $uni-text-color-grey;
					}
				}
			}
		}

		.title {
			.text {
				width: 0;
				flex: 1;

				.pcs {
					font-size: 40rpx;
					font-weight: bold;
					line-height: 64rpx;
				}

				.Address {
					font-size: 28rpx;
					line-height: 52rpx;
				}
			}

			.jl {
				.jltext {
					font-size: 24rpx;
					line-height: 40rpx;
				}

				.scicon {
					width: 60rpx;
					height: 60rpx;
					font-size: 50rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					color: $uni-text-color-grey;

					&.active {
						color: $uni-color-warning;
					}
				}
			}
		}
	}
</style>